%% by yanchun.li@smail.hust.edu.cn
%% init
EquationSet_id=1;
if EquationSet_id==1
    eqs_original=@eqs1_original;
    eqs_derivation=@eqs1_derivation;
    x_init=ones(3,1);
    
    err_tol=1e-15;
    Niteration=300;
else
    eqs_original=@eqs2_original;
    eqs_derivation=@eqs2_derivation;
    x_init=zeros(3,1);
    %x_init=0.2*ones(3,1);
    
    err_tol=1e-3;
    Niteration=200;
end

%% Solving
Result_Collection=[];
err_tol_all=10.^[-1:-1:-18];
for err_tol=err_tol_all
    [x,iiIteration,err_var,time_cost]=Newton_Equation_Solver(eqs_original,eqs_derivation,x_init,err_tol,Niteration);
    a=[iiIteration,err_var,time_cost];
    [x,iiIteration,err_var,time_cost]=Simplified_Newton_Equation_Solver(eqs_original,eqs_derivation,x_init,err_tol,Niteration);
    a=[a [iiIteration,err_var,time_cost]];
    Result_Collection=[Result_Collection;a];
end
Result_Collection